//
//  NotifyingClass.m
//  TextApp
//
//  Created by Tim Isted on 08/09/2009.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "NotifyingClass.h"
#import "MathUtilities.h"
#import "WonderfulNumber.h"

@implementation NotifyingClass

- (IBAction)displaySomeText:(id)sender
{
	WonderfulNumber *myWonderfulNumber = [WonderfulNumber wonderfulNumberWithFloat:pi];
	
	NSString *stringToOutput = @"The value is: ";
	
	stringToOutput = [stringToOutput stringByAppendingString:[myWonderfulNumber storedNumberAsString]];
	
	stringToOutput = [stringToOutput stringByAppendingString:@"\n"];
	
	[textView insertText:stringToOutput];
}

- (float)generateValue:(float *)originalValue
{
	float radius = [textField floatValue];
	*originalValue = radius;
	float circumference = [MathUtilities circumferenceFromRadius:radius];
	return circumference;
}

@end